// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SYS_MESSAGE
// * CreateDate    : 2014-06-05 18:30:44
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:44
// * LastChanger   : 2014-06-05 18:30:44
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class SysMessageEntity : EntityBase
    {
        public SysMessageTable TableSchema
        {
            get
            {
                return SysMessageTable.Current;
            }
		}
		
		public SysMessageEntity()
        {

        }
		
		public SysMessageEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.MessateTitle = Convert.ToString(CommonFunctions.ToObject(dr["MESSATE_TITLE"]));
			this.MessageBody = Convert.ToString(CommonFunctions.ToObject(dr["MESSAGE_BODY"]));
			this.MessageDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["MESSAGE_DATE"]));
			this.MessageSender = Convert.ToString(CommonFunctions.ToObject(dr["MESSAGE_SENDER"]));
			this.MessageLevel = Convert.ToString(CommonFunctions.ToObject(dr["MESSAGE_LEVEL"]));
			this.FormName = Convert.ToString(CommonFunctions.ToObject(dr["FORM_NAME"]));
        }
		
		public SysMessageEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.MessateTitle = Convert.ToString(CommonFunctions.ToObject(dr["MESSATE_TITLE"]));
			this.MessageBody = Convert.ToString(CommonFunctions.ToObject(dr["MESSAGE_BODY"]));
			this.MessageDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["MESSAGE_DATE"]));
			this.MessageSender = Convert.ToString(CommonFunctions.ToObject(dr["MESSAGE_SENDER"]));
			this.MessageLevel = Convert.ToString(CommonFunctions.ToObject(dr["MESSAGE_LEVEL"]));
			this.FormName = Convert.ToString(CommonFunctions.ToObject(dr["FORM_NAME"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SysMessageTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(SysMessageTable.C_ID)); }
            set { SetData(SysMessageTable.C_ID, value); }
        }
		
        [DataMember]
        public string MessateTitle
        {
            get { return Convert.ToString(GetData(SysMessageTable.C_MESSATE_TITLE)); }
            set { SetData(SysMessageTable.C_MESSATE_TITLE, value); }
        }
		
        [DataMember]
        public string MessageBody
        {
            get { return Convert.ToString(GetData(SysMessageTable.C_MESSAGE_BODY)); }
            set { SetData(SysMessageTable.C_MESSAGE_BODY, value); }
        }
		
        [DataMember]
        public DateTime MessageDate
        {
            get { return Convert.ToDateTime(GetData(SysMessageTable.C_MESSAGE_DATE)); }
            set { SetData(SysMessageTable.C_MESSAGE_DATE, value); }
        }
		
        [DataMember]
        public string MessageSender
        {
            get { return Convert.ToString(GetData(SysMessageTable.C_MESSAGE_SENDER)); }
            set { SetData(SysMessageTable.C_MESSAGE_SENDER, value); }
        }
		
        [DataMember]
        public string MessageLevel
        {
            get { return Convert.ToString(GetData(SysMessageTable.C_MESSAGE_LEVEL)); }
            set { SetData(SysMessageTable.C_MESSAGE_LEVEL, value); }
        }
		
        [DataMember]
        public string FormName
        {
            get { return Convert.ToString(GetData(SysMessageTable.C_FORM_NAME)); }
            set { SetData(SysMessageTable.C_FORM_NAME, value); }
        }
		
		#endregion
	}
	
	
}	

